<!--
 * @Description  : 
 * @Author       : jiangxiaoying
 * @Date         : 2021-03-17 14:23:39
 * @LastEditTime : 2021-03-18 14:21:22
 * @LastEditors  : jiangxiaoying
 * @FilePath     : \cloud-components\docs\pages\components\cloud-message\example6.vue
-->
<template>
  <div>
    <CloudButton @click="success"> Success </CloudButton>
    <CloudButton @click="error" class="error-button"> Error </CloudButton>
    <CloudButton @click="info"> Info </CloudButton>
    <CloudButton @click="warning"> Warning </CloudButton>
    <CloudButton @click="warn"> Warn </CloudButton>
    <CloudButton @click="loading"> Loading </CloudButton>
    <CloudButton @click="open"> Open </CloudButton>
  </div>
</template>

<script>

import { $cloudMessage } from 'cloud-components'; 

export default {
  title: '6.直接使用$cloudMessage',
  methods: {
    open() {
      $cloudMessage.open('This is a open message');
    },
    success() {
      $cloudMessage.success('This is a success message');
    },
    error() {
      $cloudMessage.error('This is an error message');
    },
    info() {
      $cloudMessage.info('This is an info message');
    },
    warning() {
      $cloudMessage.warning('This is a warning message');
    },
    warn() {
      $cloudMessage.warn('This is a warn message');
    },
    loading() {
      $cloudMessage.loading('This is a loading message');
    },
  },
  mounted() {
   // console.log('$cloudMessage', $cloudMessage)
  }
};
</script>